package com.ciquan.server.service.impl;

import com.ciquan.server.bean.SysMessage;
import com.ciquan.server.dao.SysMessageMapper;
import com.ciquan.server.service.SysMessageService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * Created by bjliwei2014 on 2015/3/10.
 */
@Service
public class SysMessageServiceImpl implements SysMessageService {

    @Resource
    private SysMessageMapper sysMessageMapper;

    @Override
    public int insert(SysMessage sysMessage) {
        return sysMessageMapper.insert(sysMessage);
    }

    @Override
    public int selectCount() {
        return sysMessageMapper.selectCount();
    }

    @Override
    public List<SysMessage> selectList(Map<String, Object> map) {
        return sysMessageMapper.selectList(map);
    }

    @Override
    public List<SysMessage> selectByUser(Map<String, Object> map) {
        return sysMessageMapper.selectByUser(map);
    }

    @Override
    public int readMessage(Map<String, Object> map) {
        return sysMessageMapper.readMessage(map);
    }

    @Override
    public int unReadCount(int userId) {
        return sysMessageMapper.unReadCount(userId);
    }

    @Override
    public int delete(int id) {
        return sysMessageMapper.delete(id);
    }
}
